#!/bin/bash
CURRENTPATH=$(cd `dirname $0`; pwd)
cd $CURRENTPATH

cd ..

current_directory=$(pwd)

node_modules/.bin/vitepress build docs -v
node_modules/.bin/vite build --mode example

rm -r "$current_directory/dist/docs"
cp -r "$current_directory/docs/.vitepress/dist/" "$current_directory/dist/docs"